package com.caojing.syby.ui.details.productdetail;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ImageView;
import android.widget.PopupWindow;
import android.widget.TextView;

import com.caojing.syby.R;
import com.caojing.syby.base.BaseActivity;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class ClickGridviewItemActivity extends BaseActivity {


    @Bind(R.id.webview_clickgridviewitem)
    WebView webviewClickgridviewitem;
    @Bind(R.id.imageview_click_gridviewactivity_back)
    ImageView imageviewClickGridviewactivityBack;
    @Bind(R.id.textview_gridviewactivity_title)
    TextView textviewGridviewactivityTitle;
    @Bind(R.id.imageview_click_gridviewactivity_share)
    ImageView imageviewClickGridviewactivityShare;

    private PopupWindow mPopupWindow;


    @Override
    protected int getLayoutId() {
        return R.layout.activity_click_gridview_item;
    }

    @Override
    protected void initView() {
        Intent intent = getIntent();
        String spreadUrl = intent.getStringExtra("spreadUrl");
        String name = intent.getStringExtra("name");
        textviewGridviewactivityTitle.setText(name);
        webviewClickgridviewitem.loadUrl(spreadUrl);
        webviewClickgridviewitem.setWebViewClient(new WebViewClient());
        webviewClickgridviewitem.setWebChromeClient(new WebChromeClient());
        webviewClickgridviewitem.getSettings().setJavaScriptEnabled(true);

    }

    @Override
    protected void initData() {

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }

    @OnClick({R.id.imageview_click_gridviewactivity_back, R.id.imageview_click_gridviewactivity_share})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.imageview_click_gridviewactivity_back:
                finish();
                break;
            case R.id.imageview_click_gridviewactivity_share:





                break;
        }
    }
}
